#include<stdio.h>
#include<math.h>
int main()
{
    double s,v=0;
    scanf("%lf%lf",&s,&v);
    int i=ceilf(s/v);
    int n=470-i;
    printf("%d\n",n);
    int a=n/60;
    int b=n%60;
    printf("%02d:%02d",a,b);
    return 0;
}
